package com.dangz.dans.model;

import javax.persistence.*;
import java.util.Date;

/**
 * User 用户实体
 * @author dangz
 * @since 2017/12/18 15:56
 */
@Entity
@Table(name = "user")
public class User implements java.io.Serializable {
    private String userId;
    private String userName;
    private String userPwd;
    private String orgId;
    private Date bir;
    private Org org;
    private String chatGroups;
    private String clientId;

    @Id
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPwd() {
        return userPwd;
    }

    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    public Date getBir() {
        return bir;
    }

    public void setBir(Date bir) {
        this.bir = bir;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    @OneToOne
    @JoinColumn(name = "orgId", insertable = false, updatable = false)
    public Org getOrg() {
        return org;
    }

    public void setOrg(Org org) {
        this.org = org;
    }

    public String getChatGroups() {
        return chatGroups;
    }

    public void setChatGroups(String chatGroups) {
        this.chatGroups = chatGroups;
    }

    @Transient
    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
}
